FROM openjdk:8u212-jdk-alpine3.9

# install alibaba arthas for debug/trace
ADD https://arthas.aliyun.com/arthas-boot.jar /opt/arthas-boot.jar

ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# set default env vars
ENV JAVA_OPTS="\
-server \
-Xms128M \
-Xmx256M \
-Xss256K"

ENV EMT="dev"

# set work dir
WORKDIR /opt

COPY target/jjj-food-1.0.jar /opt
#COPY jjj_food_chain/bootstrap/config/src/main/resources/ /opt/config/

EXPOSE 8891

ENTRYPOINT ["sh", "-c","java $JAVA_OPTS -jar jjj-food-1.0.jar --spring.profiles.active=$EMT"]